//
//  KMValue.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 ZHBen. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol KMValueProtocol <NSObject>

- (id)execute:(NSObject *)object;

@end

@interface KMValue : NSObject <KMValueProtocol>

@property (strong, nonatomic) id userInfo;

@property (nonatomic) BOOL useCache;

- (instancetype)initWithBlock:(id (^)(KMValue * value, __kindof NSObject * object))block userInfo:(id)userInfo;

- (void)clearCache;

+ (KMValue *)classNameValue;

+ (KMValue *)keyPathValue:(NSString *)keyPath;

+ (KMValue *)indexValue:(NSInteger)index;

+ (KMValue *)conditionValue:(id<KMValueProtocol>)value branchInfo:(NSDictionary *)branchInfo;

+ (KMValue *)chanValue:(NSArray<id<KMValueProtocol>> *)valueList;

@end




